<?php
$sel = $_GET['sel'];

//stock- sel=1
if ($sel == 1){
	$con = mysql_connect("mysql1.000webhost.com", "a7424976_info", "thebest5");
	$res = mysql_select_db("a7424976_info");
	
	$queryres = mysql_query("select * from inventory where state=0");
	while(($row = mysql_fetch_row($queryres))){
		echo "$row[0]-$row[1]-$row[2]-$row[3]-$row[4]+";	
	}
	mysql_close($con);
}
//delivery - sel =2
else if ($sel == 2){
	$con = mysql_connect("mysql1.000webhost.com", "a7424976_info", "thebest5");
	$res = mysql_select_db("a7424976_info");
	
	$queryres = mysql_query("select * from inventory where state=1");
	while(($row = mysql_fetch_row($queryres))){
		echo "$row[0]-$row[1]-$row[2]-$row[3]-$row[4]+";	
	}
	mysql_close($con);
}

?>